/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Principal;

import java.io.File;
import javax.swing.filechooser.FileFilter;

/**
 *
 * @author Administrador
 */
public class XMLFileFilter extends FileFilter {

    private String filtrar = ".xml";

    @Override
    public boolean accept(File f) {
        if (f.isDirectory() || f.getName().toLowerCase().endsWith(filtrar))
        {
            return true;
        }
        return false;
    }

    @Override
    public String getDescription() {
        return ("Archivos XML (*" + filtrar + ")");
    }

}
